<!--  -->
<template>
  <div class="title flex shrink">
    <span class="txt">{{ name }}</span>
    <span class="more" @click="jump" v-show="more">{{ more }}></span>
  </div>
</template>

<script>
// import * as api from "../api/index";
import dayjs from "dayjs";
import { openWeb } from "../script/utils";

export default {
  props: {
    name: {
      default: "标题",
      type: String,
    },
    more: {
      default: "更多",
      type: String,
    },
    link: {
      default: "",
      type: String,
    },
  },
  data() {
    return {};
  },

  components: {},

  computed: {},

  mounted() {},

  methods: {
    jump() {
      if (this.more == "课程表") {
        this.$emit("notice");
      } else {
        // openWeb(path + "/client/jcHome.htm#" + this.link, this.name, 0);
        this.$router.push({
          //核心语句
          path: this.link,
        });
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.title {
  height: 34px;
  min-width: 156px;
  background: #27282e;
  border: 1px solid #000000;
  position: relative;
  align-items: center;
  justify-content: space-between;
  .txt {
    font-size: 16px;
    color: #ffffff;
    &:before {
      content: "";
      display: inline-block;
      margin-right: 5px;
      width: 10px;
      height: 8px;
      background: url(../images/jiao.png) no-repeat center;
      background-size: 100%;
    }
  }
  .more {
    float: right;
    padding-right: 17px;
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
  }
}
</style>
